package xjtu.se.articlecommunity.user.login.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xjtu.se.articlecommunity.common.CommonService;
import xjtu.se.articlecommunity.user.login.dao.ULoginDao;
import xjtu.se.articlecommunity.user.login.dto.ULoginDto;

import javax.annotation.Resource;

@Service
@Transactional
public class ULoginService {
    @Resource
    private ULoginDao loginDao;
    @Resource
    private CommonService commonService;

    public boolean checkLogin(ULoginDto dto){
        int cnt = loginDao.findCountByID(dto);
        return cnt>0;
    }

    public boolean ifbaned(String u_key){
        return loginDao.ifBanedUser(u_key)>0;
    }


}
